package com.zzqstart.cateservice.service;

import com.zzqstart.cateservice.entity.CateRecipe;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzqstart.cateservice.entity.vo.BackRecipeQuery;
import com.zzqstart.cateservice.entity.vo.PublishRecipeVo;
import com.zzqstart.cateservice.entity.vo.RecipeFrontVo;
import com.zzqstart.cateservice.entity.vo.RecipeQueryVo;
import com.zzqstart.commonutils.entity.RecipeDetailFrontVo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author testjava
 * @since 2023-03-06
 */
public interface CateRecipeService extends IService<CateRecipe> {

    // 根据时间发布显示首页八条菜谱
    List<CateRecipe> getIndexRecipeList();

    // 条件查询+分页
    Map<String, Object> getRecipeFrontList(Long page, Long limit, RecipeQueryVo recipeQueryVo);

    // 发布菜谱
    boolean publishRecipe(PublishRecipeVo createRecipeVo);

    // 根据菜谱id获取菜谱信息
    RecipeDetailFrontVo getRecipeDetailById(String recipeId);
    PublishRecipeVo getRecipePublishInfoById(String recipeId);

    Map<String, Object> getRecipeListByMemberId(Long page, Long limit, RecipeQueryVo recipeQueryVo);

    Map<String, Object> pageBySearch(long page, long limit, String inputValue);

    Map<String, Object> getRecipeBySearchObj(long page, long limit, BackRecipeQuery cateRecipe);

    boolean markRecipe(String recipeId, BigDecimal grade,String memberId);

    String getPublishNameByRecipeId(String recipeId);

    Map<String, Object> getCollectRecipeByMemberId(Long page, Long limit, List<String> recipeIdList);
}
